package o;

import com.huawei.appgallery.jsonkit.api.annotation.FieldSecurity;
import com.huawei.appgallery.jsonkit.api.annotation.SecurityLevel;
import com.huawei.appmarket.service.installresult.dao.InstallResultCache;
import java.util.List;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;

public class eas extends cvs {
    public static final String API_METHOD = "client.installResultBatchRep";
    private List<InstallResultCache> installResultCacheList;
    @FieldSecurity(security = SecurityLevel.PRIVACY)
    private String installResults_;

    public eas() {
        super.setMethod_(API_METHOD);
        setStoreApi("clientApi");
    }

    public void ˎ(List<InstallResultCache> list) {
        this.installResultCacheList = list;
    }

    protected void onSetValue() {
        super.onSetValue();
        if (!CollectCheck.isEmpty(this.installResultCacheList)) {
            JSONArray jSONArray = new JSONArray();
            for (InstallResultCache toJson : this.installResultCacheList) {
                try {
                    jSONArray.put(new JSONObject(toJson.toJson()));
                } catch (JSONException e) {
                    Logger.e(cvs.TAG, "JSONException");
                } catch (IllegalAccessException e2) {
                    Logger.e(cvs.TAG, "IllegalAccessException");
                }
            }
            this.installResults_ = jSONArray.toString();
        }
    }
}
